package com.qcby.demo;

public class TransferServiceImpl implements TransferService {
    @Override
    public void transfer(String fromAccount, String toAccount, double amount) {
        // 模拟转账业务逻辑
        System.out.println("从 " + fromAccount + " 向 " + toAccount + " 转账 " + amount + " 元");
        // 假设这里可能发生异常
        if (amount > 1000) {
            throw new RuntimeException("并发转账异常");
        }
        System.out.println("转账成功");
    }
}
